package test;

import common.HttpUtils;
import util.cryptogram.MD5Util;

import java.util.Map;

/**
 * Created by Administrator on 2018/2/7.
 */
public class Properties {
    public static String baseUrl = "http://127.0.0.1:8081/api/httpApi/";
    public static final String uid = "WuTai";
    public static final String key = "9EEFB7335988C499";
    public static final String addBusinessInfo = "addBusinessInfo";
    public static final String automaticExtractionExpert = "automaticExtractionExpert";
    public static final String manuallyExtractionExpert = "manuallyExtractionExpert";
    public static final String addBusinessExperts = "addBusinessExperts";
    public static final String addBusinessResult = "addBusinessResult";
    public static final String getExpertDetailInfo = "getExpertDetailInfo";
    public static final String verifyExpertAccount = "verifyExpertAccount";



    public static String sendData(String interfaceName, Map<String,Object> dataMap, String uid, String key) throws Exception {

        dataMap.put("uid",uid);
        dataMap.put("timeStamp",new Long(System.currentTimeMillis()).toString());
        dataMap.put("sign", MD5Util.md5Hex(dataMap.get("timeStamp") + key));

        return HttpUtils.post(baseUrl + interfaceName, dataMap);
    }


}
